package com.aifund.common.dao;

import com.aifund.common.entity.AiRobot;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface AiRobotDao extends JpaRepository<AiRobot,Long>,JpaSpecificationExecutor<AiRobot> {

    /**
     * 查找所有机器人
     * @param specification
     * @return
     */
    @Override
    List<AiRobot> findAll(Specification<AiRobot> specification);

    /**
     * 查找机器人分页查询
     * @param specification
     * @param pageable
     * @return
     */
    @Override
    Page<AiRobot> findAll(Specification<AiRobot> specification, Pageable pageable);


}
